class Solution {
public:
    bool threeConsecutiveOdds(vector<int>& a) {
        for(int i=2;i<a.size();i++)
        {
            if(a[i-2]&1 && a[i-1]&1 && a[i]&1)
                return true;
        }

        return false;
    }
};
